import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
// import PageView  from '@/layouts/PageView'

// 路由配置
const options = {
  routes: [
    {
      path: '/login',
      name: '登录页',
      component: () => import('@/pages/login')
    },
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
    {
      path: '/',
      name: '首页',
      component: TabsView,
      redirect: '/login',
      children: [
        {
          path: 'home',
          name: '首页',
          meta: {
            icon: 'iconhome'
          },
          component: () => import('@/pages/home/index'),
        },
        {
          path: 'UserManagement',
          name: '用户管理',
          meta: {
            icon: 'iconUserManagement'
          },
          component: BlankView,
          children: [
            {
              path: 'dataMonitoring',
              name: '数据监控',
              component: BlankView,
              children: [
                  {
                    path: '',
                    name: '数据监控',
                    meta: {
                      invisible: true
                    },
                    component: () => import('@/pages/UserManagement/dataMonitoring'),
                  },
                {
                  path: 'data/:id',
                  name: '数据监控',
                  meta: {
                    invisible: true
                  },
                  component: () => import('@/pages/UserManagement/data'),
                },
                {
                  path: 'importUser',
                  name: '数据监控',
                  meta: {
                    invisible: true
                  },
                  component: () => import('@/pages/UserManagement/importUser'),
                },
              ],
            },
            {
              path: 'alarmRecord',
              name: '报警记录',
              component: () => import('@/pages/UserManagement/alarmRecord'),
            }
          ]
        },
        {
          path: 'organization',
          name: '机构管理',
          meta: {
            icon: 'iconorganization'
          },
          component: () => import('@/pages/organization/index'),
        },
        {
          path: 'equipment',
          name: '设备管理',
          meta: {
            icon: 'iconequipment'
          },
          component: () => import('@/pages/equipment/index'),
        },
        {
          path: 'system',
          name: '系统管理',
          meta: {
            icon: 'iconsystem'
          },
          component: BlankView,
          children: [
            {
              path: 'parameters',
              name: '报警参数',
              component: BlankView,
              children: [
                {
                  path: '',
                  name: '报警参数',
                  meta: {
                    invisible: true
                  },
                  component: () => import('@/pages/system/parameters'),
                },
                {
                  path: 'createFence',
                  name: '电子围栏',
                  meta: {
                    invisible: true
                  },
                  component: () => import('@/pages/system/createFence'),
                }
              ]
            },
            {
              path: 'personal',
              name: '个人中心',
              component: () => import('@/pages/system/personal'),
            },
          ]
        }
      ]
    },
    {
      name: '数据看板',
      path: '/view',
      component: () => import('@/pages/view/index'),
    },
  ]
}

export default options
